package com.megalith.feign;

import com.megalith.entities.Order;
import com.megalith.feign.fallback.OrderFeignServiceFallback;
import com.megalith.vo.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.List;

/**
*@Description openFeign 声明式远程调用
*@Author lfp
*@Date 2021/4/12 14:44
*@Return
*/
@FeignClient(value = "order-service",fallback = OrderFeignServiceFallback.class)
public interface OrderFeignService {

    @GetMapping("/order/list")
    public Result<List<Order>> getOrderList();
}